﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Ryder_US_Website.Presentation.Admin
{
    public partial class Admin : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["RUS_User"] != null)
            {
                RUS_User user = (RUS_User) Session["RUS_User"];
                lbHello.Text = "Chào, " + user.User_username;
                LinkButtonLogOut.Visible = true;
            }
        }

        protected void LinkButtonLogOut_Click(object sender, EventArgs e)
        {
            Session.Remove("RUS_User");
            Response.Redirect("Login.aspx");
            try
            {
                
            } catch(Exception ex)
            {
                Utils.UtilHelpers.ShowMessage(ex.Message);
            }
        }
    }
}
